import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * User:xieChao
 * Date:2022/10/2 8:24
 */

                                      //杨辉三角
                            //动态数组实现
/**public List<Integer> getRow(int rowIndex) {
        //动态规划
        List<Integer>ret = new ArrayList<>();
        int[] dp = new int[rowIndex+1];//动态规划数组
        Arrays.fill(dp,1);//填充 1
        for(int i = 2;i<rowIndex+1;i++){
        for(int j = i-1;j>0;j--){
        dp[j]+=dp[j-1];
        }
        }
        for(int i = 0;i<dp.length;i++){
        ret.add(dp[i]);
        }
        return ret;
        }*/
class  Solution {
    /**
     * 输入数字几就打印几行的值
     */
    /**public List<List<Integer>> generate(int numRows) {
        List<List<Integer>>ret = new ArrayList<>();
        //第一行
        List<Integer>list1 = new ArrayList<>();
        list1.add(1);
        ret.add(list1);//把第一行存入ret

        for (int i = 1; i < numRows; i++) {
            List<Integer>list = new ArrayList<>();
            list.add(1);//每一行开始都是1

            List<Integer>preRow = ret.get(i-1);//上一行
            for (int j = 1; j < i; j++) {
                //中间情况
                int num1 = preRow.get(j)+preRow.get(j-1);//(i-1)(j)+(i-1)(j-1)
                list.add(num1);
            }
            //进不去上面这个for循环就是边都是1的情况
            list.add(1);//每一行结尾都是1
            ret.add(list);
        }
        return ret;*/



    /**
     * 输入数字几返回第几行的杨辉三角数组
     * @param rowIndex
     * @return
     * 算法实现
     */
    public List<Integer> getRow(int rowIndex) {
        List<Integer> ret = new ArrayList<>(rowIndex + 1);
        long cur = 1;
        for (int i = 0; i <= rowIndex; i++) {
            ret.add((int)cur);//每一行都是1

            cur = cur * (rowIndex-i)/(i+1);//所查找的该 行 杨辉三角数值

        }
        return ret;
    }


    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int rowIndex = scanner.nextInt();
        //int index = scanner.nextInt();

        Solution s = new Solution();
        System.out.println(s.getRow(rowIndex));


    }

public class TestDemo {

}

                                //删除相同字母(顺序表)
    public static void main1(String[] args) {
        String str1 = "welcome to bit";
        String str2 = "come";
        ArrayList<Character>list = new ArrayList<>();
        for (int i = 0; i < str1.length(); i++) {
            char ch = str1.charAt(i);
            if(!str2.contains(ch+"")){
                list.add(ch);
            }
        }
        for (char ch:list){
            System.out.print(ch);
        }
    }
}
